import request from '@/utils/request'
//添加课程
export function addCourse(data) {
  return request({
    url: '/course',
    method: 'post',
    data: data
  })
}
//获取课程
export function getCourseList(query) {
  return request({
    url: '/course/list',
    method: 'get',
    params: query
  })
}
//删除课程
export function deleteCourse(data) {
  return request({
    url: '/course/'+data,
    method: 'delete',
  })
}
//修改课程
export function upCourse(data) {
  return request({
    url: '/course',
    method: 'put',
    data: data
  })
}
//获取单个课程
export function getCourse(id) {
  return request({
    url: '/course/' + id,
    method: 'get'
  })
}
//课程封面
export function uploadCover(data) {
  return request({
    url: '/course/img',
    method: 'post',
    data: data
  })
}


